<?php

/**
 *User login form class
 **/

class Form_Login extends My_Form
{

  public function init()
  {
        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('Username:')
				->addValidator('alnum')
				->addFilter('StringTrim')
                ->setRequired(true);
                 
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password:')
                ->addValidator('stringLength', true, array(6))
      			->setRequired(true)
      			->addFilter('StringTrim');
                 
        $login = new Zend_Form_Element_Submit('login');
        $login->setLabel('Sign In');
        
        $this->addElements(array($username, $password, $login));
        $this->setMethod('post');
        $this->setAction(Zend_Controller_Front::getInstance()->getBaseUrl().'/auth/login');
		$this->setAttrib('id', 'loginform');
		
  }



  //close class
}